package org.topteam.oschat;

import org.topteam.oschat.akka.SessionActor;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;

public class Oschat {

	private static Oschat instance = new Oschat();

	private ActorSystem actorSystem;

	private ActorRef sessionActor;

	public static Oschat getInstance() {
		return instance;
	}

	private Oschat() {
	}

	public ActorSystem getAkkaSystem() {
		return actorSystem;
	}

	public void setAkkaSystem(ActorSystem actorSystem) {
		this.actorSystem = actorSystem;
		this.sessionActor = actorSystem.actorOf(
				Props.create(SessionActor.class), "session");
	}

	public ActorRef getSessionActor() {
		return sessionActor;
	}
}
